import type { PaginationQuery, PaginationResponse } from './common'

// 价格管理
export interface Price {
  id: number
  wasteType: WasteType
  price: number
  unit: string
  deviceIds: number[]
  deviceNames: string[]
  status: PriceStatus
  effectiveDate: string
  expiredDate?: string
  remark?: string
  createdAt: string
  updatedAt: string
}

// 价格状态
export type PriceStatus = 'active' | 'inactive' | 'expired'

// 回收类型
export type WasteType = 'paper' | 'plastic' | 'metal' | 'glass' | 'textile' | 'mixed'

// 价格查询参数
export interface PriceQuery extends PaginationQuery {
  keyword?: string
  wasteType?: WasteType
  status?: PriceStatus
  dateRange?: string[]
}

// 价格表单
export interface PriceForm {
  wasteType: WasteType
  price: number
  unit: string
  deviceIds: number[]
  effectiveDate: string
  expiredDate?: string
  remark?: string
}

// 价格绑定设备表单
export interface BindDeviceForm {
  priceId: number
  deviceIds: number[]
}

// 价格统计
export interface PriceStats {
  activePrices: number
  totalDevices: number
  averagePrice: number
  priceTrend: string
}

// 价格历史记录
export interface PriceHistory {
  id: number
  priceId: number
  oldPrice: number
  newPrice: number
  operator: string
  reason: string
  createdAt: string
}
